const routes = [
  {
    path: '/user',
    component: '../layouts/UserLayout',
  },
  {
    path: '/404',
    component: '../layouts/NoFoundPage',
  },
  {
    path: '/',
    component: '../layouts/SecurityLayout',
    routes: [
      {
        path: '/',
        component: '../layouts/BasicLayout',
        authority: ['admin', 'user'],
        // routes: [],
        routes: [
          {
            path: '/',
            redirect: '/welcome',
          },
          {
            id: 1,
            name: 'menu.homepage',
            // name: '首页',
            path: '/welcome',
            component: '../pages/Welcome',
            icon: 'SmileOutlined',
          },
          {
            id: 2,
            name: 'menu.Customeraccess',
            // name: '客户入网',
            path: '/customer-access',
            icon: 'UserAddOutlined',
            routes: [
              {
                path: '/customer-access',
                redirect: '/customer-access/newcustomers',
              },
              {
                id: 21,
                name: 'menu.Newcustomers',
                // name: '新增客户',
                path: '/customer-access/newcustomers',
                component: './Customer-access/NewCustomers',
              },
              {
                id: 22,
                name: 'menu.Batchimport',
                // name: '批量导入',
                path: '/customer-access/batchimport',
                component: './Customer-access/BatchImport',
              },
              {
                id: 23,
                name: 'menu.CustomertoSubmitted',
                // name: '待提交客户查询',
                path: '/customer-access/customesubmit',
                component: './Customer-access/CustomeSubmit',
              },
            ],
          },
          {
            id: 3,
            icon: 'UserOutlined',
            // name: '用户管理',
            name: 'menu.Usermanagement',
            path: '/user-management',
            routes: [
              {
                path: '/user-management',
                redirect: '/user-management/institutionaluser',
              },
              {
                id: 31,
                path: '/user-management/institutionalusermanage',
                name: 'menu.Institutionaluser',
                // name: '机构用户管理',
                component: './User-management/InstitutionalUserManage',
              },
              {
                id: 32,
                path: '/user-management/customerusermanage',
                // name: '客户用户管理',
                name: 'menu.CustomerUserManage',
                component: './User-management/CustomerUserManage',
              },
            ],
          },
          {
            id: 4,
            icon: 'TeamOutlined',
            // name: '客户管理',

            name: 'menu.CustomerManage',
            path: '/customer-management',
            routes: [
              {
                path: '/customer-management',
                redirect: '/customer-management/customermanage',
              },
              {
                id: 41,
                path: '/customer-management/customermanage',
                name: 'menu.CustomerManage',
                // name: '客户管理',
                component: './Customer-management/CustomerManage',
              },
              {
                path: '/customer-management/customermanage/customerDetail',
                name: '客户管理详情',
                hideInMenu: true,
                component:
                  './Customer-management/CustomerManage/Operation/CustomerDetail',
              },
              {
                id: 42,
                path: '/customer-management/merchantmanage',
                // name: '特计商户管理',
                name: 'menu.MerchantManage',
                component: './Customer-management/MerchantManage',
              },
            ],
          },
        ],
      },
    ],
  },
];

export default routes;
